package com.example.springsecurity.mapper;

import com.example.springsecurity.domain.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;


@Mapper
public interface StudentExperimentMapper {
     List<RoProject> searchAllExperiment(@Param("collegeId") Integer collegeId, @Param("majorId") Integer majorId, @Param("projectName") String projectName);

    RoProject getExperimentDetail(@Param("projectId") Integer projectId);

    List<LearnMaterials> getLeanMaterials(@Param("projectId") Integer projectId);

    Video getExperimentVideo(@Param("projectId") Integer projectId);

    RoProject getAddressLink(@Param("submitId") Integer submitId);

    RoProject getMustAddressLink(@Param("submitId") Integer submitId);


    RoProject getExperimentReportContent(@Param("projectId")Integer projectId);

    void addScoreSubmit(ScoreSubmit scoreSubmit);

    Integer updateVirtualExperiment(@Param("submitId") Integer submitId,@Param("virtualExperimentScore") Integer virtualExperimentScore,@Param("value") String value);

    Integer submitExperiment(ScoreSubmit scoreSubmit);

    List<RoProject> getStudentOptionalExperiment(@Param("projectName") String projectName,@Param("userId") Integer userId);

    List<ScoreSubmit> getStudentExperimentRecord(@Param("userId") Long userId,@Param("projectId") Integer projectId);

    List<AssignExperiment> getStudentMustExperiment(@Param("username") String username,@Param("projectName") String projectName,@Param("accomplishCondition") Integer accomplishCondition);

    List<AssignExperiment> getStudentMustExperimentByZero(@Param("username") String username,@Param("projectName") String projectName,@Param("accomplishCondition") Integer accomplishCondition);


    void addStudentScoreSubmit(StudentMustScoreSubmit studentMustScoreSubmit);

    Integer submitMustExperiment(StudentMustScoreSubmit studentMustScoreSubmit);


    /**
     * 删除某次布置时，删除该次布置下所有必修实验结果
     * @param assignId
     * @return
     */
    public boolean deleteStudentExperiment(Long assignId);

    StudentMustScoreSubmit assignStudentMustExperiment(@Param("submitId") Integer submitId);

    void updateAssignExperimentCondition(AssignExperimentUser assignExperimentUser);

    /**
     * 教师批改用户提交成绩展示页面
     * @param submitId
     * @return
     */
    CorrectUser getMustScore(@Param("submitId") Integer submitId);

    Integer revocationCorrect(@Param("assignId") Integer assignId,@Param("username") String username);


    ResultExperimentScore getExperimentShareRecord(@Param("submitId") Integer submitId);

    Integer submitVideoScore(@Param("submitId") Integer submitId,@Param("videoStatus") Boolean videoStatus);

    String getChooseContent(@Param("submitId") Integer submitId);

    String getMustContent(@Param("submitId") Integer submitId);

    ResultExperimentScore getExperimentCorrectRecord(@Param("submitId") Integer submitId);

    Integer submitMustVideoScore(@Param("submitId") Integer submitId,@Param("videoStatus") Boolean videoStatus);

    ScoreSubmit getScoreSubmit(@Param("submitId") Integer submitId);

    StudentMustScoreSubmit getMustScoreSubmit(@Param("submitId") Integer submitId);

    Integer updateExperimentDate(@Param("submitId") Integer submitId);

    Integer updateMustExperimentDate(@Param("submitId") Integer submitId);

    void updateAssignExperiment(@Param("userName") String userName,@Param("assignId") Integer assignId);


    Integer updateSubmitStatus(@Param("assignId") Integer assignId);

    Integer updateMustVirtualExperiment(@Param("submitId") Integer submitId,@Param("virtualExperimentScore") Integer virtualExperimentScore,@Param("value") String value);

}
